import request from '@/utils/request'

// 查询会员任务列表
export function listMemberTask(params) {
  return request({
    url: '/admin/api/member_task/list',
    method: 'get',
    params
  })
}

// 查询会员任务详细
export function getMemberTask(id) {
  return request({
    url: '/admin/api/member_task/' + id,
    method: 'get'
  })
}

// 新增会员任务
export function addMemberTask(data) {
  return request({
    url: '/admin/api/member_task/add',
    method: 'post',
    data
  })
}

// 修改会员任务
export function updateMemberTask(data) {
  return request({
    url: '/admin/api/member_task/update',
    method: 'put',
    data
  })
}

// 删除会员任务
export function delMemberTask(data) {
  return request({
    url: '/admin/api/member_task/delete',
    method: 'delete',
    data
  })
}

// 导出会员任务
export function exportMemberTask(query) {
  return request({
    url: '/admin/api/member_task/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
